from django.db import models


# Create your models here.


class ChooseCoach(models.Model):
    id = models.AutoField(primary_key=True)
    student = models.ForeignKey('login_system.User', on_delete=models.CASCADE, related_name='student')
    teacher = models.ForeignKey('login_system.User', on_delete=models.CASCADE, related_name='teacher')
    train_time = models.DateTimeField(null=True)
    time_out = models.BooleanField(default=False)
    com = models.ForeignKey('evaluate_system.Comment', on_delete=models.SET_DEFAULT, null=True, default=None, )
    drop_class = models.CharField(null=True, default=None, max_length=255)
    teacher_leave = models.BooleanField(default=False)
    # car = models.ForeignKey('car_manage_system.Car', on_delete=models.CASCADE, null=True)


class Blacklist(models.Model):
    id = models.AutoField(primary_key=True)
    student = models.ForeignKey('login_system.User', on_delete=models.CASCADE, related_name='stud')
    teacher = models.ForeignKey('login_system.User', on_delete=models.CASCADE, related_name='teach')
    t = models.DateTimeField(auto_now_add=True)


class teacher_leave(models.Model):
    id = models.AutoField(primary_key=True)
    date = models.DateField(auto_now_add=True)
    teacher = models.ForeignKey('login_system.User',on_delete=models.CASCADE)

